package com.oocl.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.oocl.service.MerchantManager;
import com.oocl.service.factory.MerchantManagerFactory;

@WebServlet("/sec/back")
public class ReturnServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private MerchantManager merchantManager;
       
    public ReturnServlet() {
        super();
        merchantManager = MerchantManagerFactory.getInstance();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String status = request.getParameter("s");
		System.out.println(status);
		if(status!=null){
			if(status.equals("0")){
				response.sendRedirect("pendingList");
			}else if (status.equals("1")) {
				response.sendRedirect("pass");
			}else{
				response.sendRedirect("reject");
			}
		}
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}
